Section 1: Libraries
#*********************************
##Libraries
#*********************************
library(shiny)
## Warning: package 'shiny' was built under R version 3.6.2
library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.2 ✓ purrr 0.3.4
## ✓ tibble 3.0.1 ✓ dplyr 1.0.2
## ✓ tidyr 1.1.2 ✓ stringr 1.4.0
## ✓ readr 1.3.1 ✓ forcats 0.5.0
## Warning: package 'ggplot2' was built under R version 3.6.2
## Warning: package 'tibble' was built under R version 3.6.2
## Warning: package 'tidyr' was built under R version 3.6.2
## Warning: package 'purrr' was built under R version 3.6.2
## Warning: package 'dplyr' was built under R version 3.6.2
## ── Conflicts ─────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(stringr)
library(readxl)
library(readr)
library(tidyr)
library(dplyr)
library(yaml)
library(data.table)
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
## The following object is masked from 'package:purrr':
##
## transpose
library(lubridate)
## Warning: package 'lubridate' was built under R version 3.6.2
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:data.table':
##
## hour, isoweek, mday, minute, month, quarter, second, wday, week,
## yday, year
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
library(violinmplot)
## Loading required package: lattice
## Warning: package 'lattice' was built under R version 3.6.2
library(vioplot)
## Warning: package 'vioplot' was built under R version 3.6.2
## Loading required package: sm
## Package 'sm', version 2.2-5.6: type help(sm) for summary information
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 3.6.2
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(yarrr)
## Loading required package: jpeg
## Loading required package: BayesFactor
## Loading required package: coda
## Loading required package: Matrix
##
## Attaching package: 'Matrix'
## The following objects are masked from 'package:tidyr':
##
## expand, pack, unpack
## ************
## Welcome to BayesFactor 0.9.12-4.2. If you have questions, please contact Richard Morey (richarddmorey@gmail.com).
##
## Type BFManual() to open the manual.
## ************
## Loading required package: circlize
## Warning: package 'circlize' was built under R version 3.6.2
## ========================================
## circlize version 0.4.9
## CRAN page: https://cran.r-project.org/package=circlize
## Github page: https://github.com/jokergoo/circlize
## Documentation: https://jokergoo.github.io/circlize_book/book/
##
## If you use it in published research, please cite:
## Gu, Z. circlize implements and enhances circular visualization
## in R. Bioinformatics 2014.
##
## This message can be suppressed by:
## suppressPackageStartupMessages(library(circlize))
## ========================================
## yarrr v0.1.5. Citation info at citation('yarrr'). Package guide at yarrr.guide()
## Email me at Nathaniel.D.Phillips.is@gmail.com
##
## Attaching package: 'yarrr'
## The following object is masked from 'package:ggplot2':
##
## diamonds
library(datapasta)
library(reprex)
library(miniUI)
library(gridExtra)
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
Adult krill, Euphausia pacifica, were introduced to the Mobile Ocean Acidification Treatment System (MOATS) on 09SEP19-11SEP19. Krill were collected the evenings of September 9th and 10th. The system was supplied with flowing seawater from Puget Sound filtered to 1 µm, UV sterilized, and maintained at 12°C. Seawater was degassed upstream of the individual MOATs. Carbon dioxide, oxygen, and nitrogen added to each MOATs under real-time feedback control system using LabView Software (version needed) with Honeywell Durafet III pH and Vernier optical dissolved oxygen probes and Omega thermistors. Semi-diurnal flow control governed with solenoid valve to the upper, animal acrylic box. Flow rate 53 L/hr.
Simple graphic of the MOATS assembly is shown above. The krill lived in the inner acrylic 44L box at the top of the assembly. The acrylic box’s temperature was controlled with “jacket” water insulating the animal, acrylic box. The jacket water flow was constant from the lower “system-control” box. The lower box represents the location of the probes, governing the temperature and water chemistry of each replicate. #### A.2 Collection: The September 9th, 2019 collection occurred at evening low tide, slack water, occurred at 2046. Nautical Twilight concluded at 2022, with Civil Twilight concluding at 1955. Sunset happened at 1932. Boat was launched at 1940. Boat on-station IVO 47.982569, -122.307623 at approximately 2030. 50meters of cable scope was deployed at a speed of 1.5-2knots to achieve a towing depth of approximately 25meters. Five of ten tows produced suitable sized krill ( x>.0250, x<.0650).
The September 10th, 2019 collection occurred at evening low tide, slack water, occurred at 2121. Nautical Twilight concluded at 2021, with Civil Twilight concluding at 1954. Sunset happened at 1931. Boat was launched at 2015. Boat on-station IVO 47.982569, -122.307623 at approximately 2100. Tows were similar in scope and duration to September 9th , 2019.
09SEP19 25-krill were stocked between moats. 10SEP19 60 to 65-krill were stocked between MOATs to bring the project start totals to the MOATs as follows: MOATs 01- 85 | MOATs 02- 85 | MOATs 03- 80 | MOATs 04- 80 |
MOATs 05- 80 | MOATs 06- 80 | MOATs 07- 80 | MOATs 08- 80 |
MOATs 10- 80 | MOATs 11- 80 | MOATs 12- 80 | MOATs 13- 80 |
Graph 2: Replicate MOATS Lab Setup
Krill were held under acclimation conditions for 11-12 days and treatment conditions for 35-37 days. They were housed in 44L aquaria inside each replicate experimental treatment at an initial density of 80-85 krill per replicate (1.8 krill/L; ~ 3 g krill per replicate).
Krill Treatment determinations were made approximately on 19SEP19 and confirmed on 24SEP19 with the introduction of the ambient treatment. The division shown below was aimed to start the experiment with survival divided equally among MOATS.
#### B.1a Inital Treatment Determinations Determinations on 19SEP19
“All Change” Conditions Treatment: M02, M05, M08, M13 “High Temperature” Conditions Treatment: M01, M04, M06, M11 “Current” Conditions Treatment: M03, M07, M10, M12
Further explanations will be shown in time series of this documnet.
Graphic 4: Treatment Determination
1.0 Look for all files inside the Water Chemistry folder of the “06. MOATs replication verification” folder [OA Drive Krill 2019 MOAT01-13n17 File]https://drive.google.com/file/d/1abruA-oMCd5XdNcph2yQzDr2Hyb-_pHD/view?usp=sharing
Inside the working directory (folder) is 1 CSV files generated after combining 13CSV logs representing 24second observations. These CSV files were created using the moats graph app
Link to moats.Graph.app Moving average window (nObs) set to 4.
Every 17th observations was selected, the observations were 24second apart.
1 CSVs per moats: M01, M02, M03, M04, M05, M06, M07, M08, M09, M10, M11, M12, M13. Files are also available on the OA Google drive. OA Drive for MOATS data
13 set of logs from the replicates was recorded with (lab view software version needed) 13 Logic Volume Management files recorded observations across all thermisters and probes every six seconds. Shiny app [P.McElpany MOATS App] https://github.com/pmcelhany/moatsGraphs
Graphic 5: Treatment Determination
All observations (per the 13 MOATS logs) [1] 1137880 7 (6 seconds) Number of observations after subsampling every 17th response/observation [1] 66934 7 (24 seconds) Number of observations after the super-subsampling, every 333rd observation [1] 3417 7 (~30minutes)
The ramp period is not best displayed
To examine the Day to Night ramp (D2Nramp) researcher used n17 subsampling group
#*********************************
## 2. Calling & Reading in " dml "
#*********************************
# Super Speedy subsampled dat
getwd()
## [1] "/Users/katherinerovinski/GIT/NWFSC.MUK_KRL_SMR2019_ambientandbroken/01_Rawdata"
setwd("/Users/katherinerovinski/GIT/NWFSC.MUK_KRL_SMR2019_ambientandbroken/01_Rawdata")
getwd()
## [1] "/Users/katherinerovinski/GIT/NWFSC.MUK_KRL_SMR2019_ambientandbroken/01_Rawdata"
dml <- read.csv(file = "M01thruM13moatslog_n17.csv", stringsAsFactors = FALSE)
dim(dml)
## [1] 66934 7
Changing MOATs to Factors for the 13 different MOATs- these will be the discrete units for follow analysis
#*********************************
## 3. Reformatting variables/vectors (Factors)
#*********************************
## 3.3 Changing variables |
dml$moats <- factor(dml$moats)
# Checking the names of the different levels
levels(dml$moats)
## [1] "M01" "M02" "M03" "M04" "M05" "M06" "M07" "M08" "M09" "M10" "M11" "M12"
## [13] "M13"
##checking the dataset, dimensions
dim(dml)
## [1] 66934 7
Changes to the format of dates and times for observations
dml$dateTime <- as.POSIXct(dml$dateTime, format="%Y-%m-%d %H:%M:%OS")
ReferenceTime <- as.POSIXct("2019-09-20 23:59:00")
class(ReferenceTime)
## [1] "POSIXct" "POSIXt"
# QA check
dim(dml)
## [1] 66934 7
Three treatments of this studies are identified as * “current” for the Current Conditions Treatment * “hightemperature” for the High Temperature Conditions Treatment * “allchange” for the All Change Conditions Treatment which incorporated both the high temperature conditions of the “hightemperature” treatment along with exposure to lower aquariun pH.
## 5.1 Identifying treatments by moats
## establishing treatments
dml$treatment <- ""
dml$treatment[dml$moats == "M03" | dml$moats == "M07" | dml$moats== "M10" | dml$moats== "M12"] <- "current"
dml$treatment[dml$moats == "M01"| dml$moats== "M04"| dml$moats== "M06"| dml$moats== "M11"] <- "hightemperature"
dml$treatment[dml$moats == "M02"| dml$moats== "M05" | dml$moats== "M08" | dml$moats== "M13"] <- "allchange"
dml$treatment[dml$moats == "M09"] <- "broken"
dml$final_treatment <- ""
dml$final_treatment[dml$moats == "M07" | dml$moats== "M10" | dml$moats== "M12"] <- "current"
dml$final_treatment[dml$moats == "M01"| dml$moats== "M06"] <- "hightemperature"
dml$final_treatment[dml$moats == "M02"| dml$moats== "M08" | dml$moats== "M13"] <- "allchange"
dml$final_treatment[dml$moats == "M04" |dml$moats == "M05"] <- "ambient"
dml$final_treatment[dml$moats == "M03"| dml$moats == "M09" | dml$moats== "M11"] <- "broken"
#verify that this new column has been created
names(dml)
## [1] "moats" "dateTime" "aTemperature" "sTemperature"
## [5] "pH" "DO" "salinity" "treatment"
## [9] "final_treatment"
#results should include:
#[1] "moats" "dateTime" "aTemperature" "sTemperature" "pH"
#[6] "DO" "salinity" "treatment"
# QA check
dim(dml)
## [1] 66934 9
Those MOATS aquarium systems that did not reach desired/programed conditions were deemed the “ambient” treatment. No temperature, DO, or pH conditions were programmed or alarmed. Flow control was governed by a solenoid valve to acheive flow/no-flow, day/night periods.
MOATS inside the “Ambient” treatment included MOATs 04 and MOATs 05 both were shown to have faulty thermisters.
Recorded conditions of what the animals experienced can’t be guaranteed/confirmed.
Without a record of aquarium settings MOATs 04 and MOAT 05 data was not included.
Creating a day and night variables Day and night periods will only refer to time under treatment as a way to exclude the acclimation period. Day and night changed at about ~ 1230 on 05OCT19 Treatment start date considered to begin Monday 23SEP19 at 1200pm Krill Night Starts 1200 (~1230) and ends 2100 Krill Days Starts 2101 and ends 1159 (~1229) Interval 1 start 1200 23SEP19, end 1229 05OCT19 Interval 2 start 1230 05OCT19, end 2100 30OCT19
## 6.2 New Column, New Variable in dml
#creating a new column, new variable "period"
dml$period <- ""
## 6.3 Disassembling dateTime to create 2 new variables
# Create new split date and time columns
dml$ObservationDate <- as.Date(dml$dateTime)
dml$ObservationTime <- format(as.POSIXct(dml$dateTime) ,format = "%H:%M:%S")
Interval 1 Interval Date Start “2019-09-23” Interval Date End “2019-10-05” Day Start Time “21:01:00” Day End Time “11:29:00” Night Start Time “12:00:00” Night End Time “21:00:00” DaytoNight Ramp(D2N) “11:30:00” start DaytoNight Ramp(D2N) “11:59:00” stop Other Time
Interval 2 Interval Date Start “2019-10-05” Interval Date End “2019-10-30” Day Start Time “21:01:00” Day End Time “12:29:00” Night Start Time “12:30:00” Night End Time “21:00:00” Other Time
## 6.5 Day / Night Assignments
# Using the "case_when" function in the tidyverse in the place of a loop
dml <- dml %>% mutate (period=case_when(
(ObservationDate >= "2019-09-23")
& (ObservationDate <="2019-10-05")
& (ObservationTime >= "12:00:00")
& (ObservationTime <="21:00:00") ~"night",
(ObservationDate >= "2019-10-05")
& (ObservationDate <= "2019-10-30")
& (ObservationTime >= "12:31:00")
& (ObservationTime <="21:00:00") ~"night",
(ObservationDate >= "2019-09-23")
& (ObservationDate <="2019-10-05")
& ((ObservationTime >= "21:01:00")
| (ObservationTime <="11:29:00")) ~"day",
(ObservationDate >= "2019-10-05")
& (ObservationDate <= "2019-10-30")
& ((ObservationTime >= "21:01:00")
| (ObservationTime <= "12:01:00")) ~"day",
(ObservationDate >= "2019-09-23")
& (ObservationDate <="2019-10-05")
& ((ObservationTime >= "11:30:00")
| (ObservationTime <="12:00:00")) ~"D2Nramp",
(ObservationDate >= "2019-10-05")
& (ObservationDate <= "2019-10-30")
& ((ObservationTime >= "12:01:00")
| (ObservationTime <= "12:30:00")) ~"D2Nramp",
TRUE ~"other"
)
)
#Quick check to see if periods were created
period.intervals <- ggplot(dml, aes(x=dateTime, y=aTemperature)) +
geom_point(aes(colour=period, point=)) +
ggtitle("aTemperature Time Series Plots to Invesitgate Different Period Intervals") +
ylim (5.0, 15.00)
period.intervals
## Warning: Removed 1471 rows containing missing values (geom_point).
The ramp verification will be important to dissolved oxygen verification Dissolved oxygen not yet shown. Recorded dissolved oxygen needs to be corrected with observed salinity.
The following 2 plots are only present to visualize the different periods across treatments
ggplot(subset(dml,
period %in% ("D2Nramp")),
aes(x=dateTime, y=aTemperature)) +
geom_point(aes(colour=treatment, point=)) +
ylim (5.0, 15.00) +
ggtitle("aTemperature Values, All MOATs, During Day to Night Ramp Period")
## Warning: Removed 26 rows containing missing values (geom_point).
The acclimation and the time after animals were removed from the system was designated other
# Removing "other" period from day and night
# not including acclimation period in this investigation
dml <- dml %>% filter(period != "other")
The following plots display timeseries plots for each MOATS
7.1 MOATs 01 Aquarium Temperature Timeseries
MOATS01plot7.1 <-ggplot(subset(dml[dml$moats == "M01", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 01 Aquarium Temperature Timeseries")
MOATS01plot7.1
7.2 MOATs 02 Aquarium Temperature Timeseries
MOATS01plot7.2 <-ggplot(subset(dml[dml$moats == "M02", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 02 Aquarium Temperature Timeseries")
MOATS01plot7.2
7.3 MOATs 03 Aquarium Temperature Timeseries
MOATS01plot7.3 <-ggplot(subset(dml[dml$moats == "M03", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 03 Aquarium Temperature Timeseries")
MOATS01plot7.3
The weekend of 19-20OCT saw a drop in water volume of the bubble boxes, troubleshot to clogged filtered. This fault was a cascade of problems for DO, pH, and temperature across all replicates but acutely in MOATS 03.
MOATs 03 was dropped from the study on 24OCT19 primarily a high temperature spike, pH did drop below treatment. This impacted the respirometry samples for Day 1, 28OCT19. MOATs 12 had two rounds of respirometry that day.
7.4 MOATs 04 Aquarium Temperature Timeseries
MOATS01plot7.4 <-ggplot(subset(dml[dml$moats == "M04", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 04 Aquarium Temperature Timeseries")
MOATS01plot7.4
M4dml <- dml %>% filter(!moats %in% c("M01", "M02", "M03", "M6")) %>%
filter(aTemperature>= 1 & aTemperature<=30) %>%
filter(period != "other")
MOATS01plot7.4a <-ggplot(subset(M4dml[M4dml$moats == "M04", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 04 Aquarium Temperature Timeseries, Negative Temperatures Filter")
MOATS01plot7.4a
7.5 MOATs 05 Aquarium Temperature Timeseries
MOATS01plot7.5a <-ggplot(subset(dml[dml$moats == "M05", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 05 Aquarium Temperature Timeseries")
MOATS01plot7.5a
#
# M4dml <- dml %>% filter(!moats %in% c("M01", "M02", "M03", "M6")) %>%
# filter(aTemperature>= 1 & aTemperature<=30) %>%
# filter(period != "other")
MOATS01plot7.5 <-ggplot(subset(M4dml[M4dml$moats == "M05", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 05 Aquarium Temperature Timeseries, Filtered to Remove Negative Temperatures")
MOATS01plot7.5
Note that MOATS 04 & MOATS 05 never came under treatment conditions. Temperature control was never achieved. Faulty termisters suspected root cause in both MOATs 04 and 05. MOATs 04 shows that the incoming seawater and room temperature of the MOATS Lab operated at a usual 12.5C day time temperature with a 10.5C nighttime temperature.
This loss of 2 MOATS replicates “changed” treatment assignments
Status of Treatment Assignments on 19SEP19
Graphic 6: Treatment Determination
Status of Treatment Assignments by Weeks End 24SEP19
Graphic 6: Treatment Determination
7.6 MOATs 06 Aquarium Temperature Timeseries
MOATS01plot7.6 <-ggplot(subset(dml[dml$moats == "M06", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 06 Aquarium Temperature Timeseries")
MOATS01plot7.6
7.7 MOATs 07 Aquarium Temperature Timeseries
MOATS01plot7.7 <-ggplot(subset(dml[dml$moats == "M07", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 07 Aquarium Temperature Timeseries")
MOATS01plot7.7
7.8 MOATs 08 Aquarium Temperature Timeseries
MOATS01plot7.8 <-ggplot(subset(dml[dml$moats == "M08", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 08 Aquarium Temperature Timeseries")
MOATS01plot7.8
7.9 MOATs 09 Aquarium Temperature Timeseries
MOATS01plot7.9 <-ggplot(subset(dml[dml$moats == "M09", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 09 Aquarium Temperature Timeseries")
MOATS01plot7.9
7.10 MOATs 10 Aquarium Temperature Timeseries
MOATS01plot7.10 <-ggplot(subset(dml[dml$moats == "M10", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 10 Aquarium Temperature Timeseries")
MOATS01plot7.10
7.11 MOATs 11 Aquarium Temperature Timeseries
MOATS01plot7.11 <-ggplot(subset(dml[dml$moats == "M11", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=period, point=)) +
ggtitle("MOATs 11 Aquarium Temperature Timeseries")
MOATS01plot7.11
26SEP19 MOATs 11 experienced significant low pH spikes and was dropped from the study. MORTs were still removed and animals were still fed so that MOATs 11 population could be used for process determination studies.
# knitr::opts_chunk$set(echo = TRUE)
#
# knitr::opts_knit$set(root.dir =
# "/Users/katherinerovinski/GIT/NWFSC.MUK_KRL_SMR2019_ambientandbroken/01_Rawdata")
#
# getwd()
# setwd("/Users/katherinerovinski/GIT/NWFSC.MUK_KRL_SMR2019_ambientandbroken/01_Rawdata")
# getwd()
#
# # setwd("/Users/katherinerovinski/GIT/NWFSC.MUK_MOATs_SMR2019/WaterChemistryData/01a. WaterChemistry Data/WaterChemistryDataframe.csv" )
#
#
# WaterChem <- read.csv(file = "WaterChemistryDataframe.csv", stringsAsFactors = FALSE)
#
#
#
# WaterChem$moats <- factor(WaterChem$moats)
# # Checking the names of the different levels
# levels(WaterChem$moats)
#
#
#
# MOATS01plot7.11a <-ggplot(subset(WaterChem[dml$moats == "M11", ])) +
# aes(x=dateTime, y=pH) +
# geom_point(aes(colour=period, point=)) +
# ggtitle("MOATs 11 Aquarium Temperature pH Timeseries")
# MOATS01plot7.11a
#
#
Graphic 7: pH spikes in MOATs 11
Graphic 8: Focus on the 3 pH spikes in MOATs 11
7.12 MOATs 12 Aquarium Temperature Timeseries
MOATS01plot7.12 <-ggplot(subset(dml[dml$moats == "M12", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("MOATs 12 Aquarium Temperature Timeseries")
MOATS01plot7.12
#
# M4dml <- dml %>% filter(!moats %in% c("M01", "M02", "M03", "M6")) %>%
# filter(aTemperature>= 1 & aTemperature<=30) %>%
# filter(period != "other")
MOATS01plot7.12a<-ggplot(subset(M4dml[M4dml$moats == "M12", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("MOATs 12 Aquarium Temperature Timeseries, Filtered to Remove Negative Temperatures")
MOATS01plot7.12a
7.13 MOATs 13 Aquarium Temperature Timeseries
MOATS01plot7.13 <-ggplot(subset(dml[dml$moats == "M13", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("MOATs 13 Aquarium Temperature Timeseries")
MOATS01plot7.13
Changes to MOATS treatment determination over time
Treatment Determination Standing as of 19SEP19
Changes on made by 24SEP19
Changes from system casualties on 26SEP19
Changes from system casualties on 24OCT19
The following plots in Chapter 8 detail the aquarium’s temperature history by treatment.
## 8.1 Removing the names of moats & treatments removed from Cdml
# Removal should allow for cleaner graphs
# Determined moats lab never got under 5C and was never over 30C
Cdml <- dml %>% filter(!moats %in% c("M03", "M04", "M05", "M11")) %>%
filter(aTemperature>= 5 & aTemperature<=30) %>%
filter(treatment %in% c("current", "allchange", "hightemperature")) %>%
filter(period != "other")
levels(Cdml$moats)
## [1] "M01" "M02" "M03" "M04" "M05" "M06" "M07" "M08" "M09" "M10" "M11" "M12"
## [13] "M13"
Cdml$moats <- droplevels(Cdml$moats)
filteredFrame = filter(Cdml,
!moats %in% c('M03', "M04", "M05", "M11") &
(aTemperature>= 5 & aTemperature<=30) &
treatment %in% c("current", "allchange", "hightemperature") &
period != "other")
####8.2 All Change Treatment
plot8.2_allchg <- ggplot(subset(Cdml[Cdml$treatment == "allchange", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("All Change Treatment Timeseries")
plot8.2_allchg
####8.3 Current Conditions Treatment
plot8.3_cur <- ggplot(subset(Cdml[Cdml$treatment == "current", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("Current Conditions Treatment Timeseries")
plot8.3_cur
####8.4 High Temperature Conditions Treatment
plot8.4_hitemp <- ggplot(subset(Cdml[Cdml$treatment == "hightemperature", ])) +
aes(x=dateTime, y=aTemperature) +
geom_point(aes(colour=moats, point=)) +
ggtitle("High Temperature Conditions Treatment")
plot8.4_hitemp